package org.wyy.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import org.wyy.dto.OrderDto;

import java.io.Serializable;

/**
 * @author wangyuanye
 * @date 2024/7/22
 **/
@Data
public class TccOrder implements Serializable {
    @TableId
    private Long orderId;
    private Long skuId;
    private Long userId;

    public static TccOrder dto2Entity(OrderDto dto) {
        TccOrder tccOrder = new TccOrder();
        tccOrder.setOrderId(dto.getOrderId());
        tccOrder.setSkuId(dto.getSkuId());
        tccOrder.setUserId(dto.getUserId());
        return tccOrder;
    }
}
